#ifndef PKGLIST_H
#define PKGLIST_H

class PackageDescription;

class PackageList
{
	public:
		PackageList();
		~PackageList();
		
		PackageDescription* getItem(int32 index);	// zero-based
		PackageDescription* getItem(char* Name, char* ZipName, int32* index);

		void addItem(PackageDescription*);
		void removeItem(PackageDescription*);		// doesn't delete it

		bool8 contains(char* Name, char* ZipName);

		int32 getCount();

	protected:
		PackageDescription	*head, *tail;
		int32				count;
};

inline
PackageList::PackageList()
{
	head = tail = (PackageDescription*)0;
	count = 0;
}

inline int32
PackageList::getCount()
{
	return count;
}

#endif
